import request from '@/utils/request'

//表格数据查询
export function getTableData(query) {
  return request({
    url: '/system/dynamicJob/job/list',
    method: 'get',
    params: query,
  })
}
//新增
export function add(data) {
  return request({
    url: '/system/dynamicJob/job',
    method: 'post',
    data,
  })
}
//修改
export function update(data) {
  return request({
    url: '/system/dynamicJob/job',
    method: 'put',
    data,
  })
}
//删除
export function deleteData(jobIds) {
  return request({
    url: `/system/dynamicJob/job/${jobIds}`,
    method: 'Delete',
  })
}
//状态修改
export function statusUpdate(data) {
  return request({
    url: '/system/dynamicJob/job/changeStatus',
    method: 'put',
    data,
  })
}
//任务执行一次
export function run(data) {
  return request({
    url: '/system/dynamicJob/job/run',
    method: 'put',
    data,
  })
}

//表格数据查询
export function getTableDataLog(query) {
  return request({
    url: '/system/dynamicJob/job/queryJobLog',
    method: 'get',
    params: query,
  })
}

//获取大屏实时数据条数
export function getAccumulation() {
  return request({
    url: '/system/dynamicJob/job/getAccumulation',
    method: 'get',
  })
}

export function geusen(data) {
  return request({
    url: '/system/dataExamine/use',
    method: 'post',
    data,
  })
}
